﻿<Window x:Class="ClosePrograms.SelectPrograms"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        mc:Ignorable="d"
        Title="Select Program" Height="300" Width="400">
    <Grid Height="Auto" Width="Auto">
        <Grid.RowDefinitions>
            <RowDefinition Height="67" />
            <RowDefinition Height="*" />
            <RowDefinition Height="45" />
        </Grid.RowDefinitions>
        <Grid Margin="0,0,0,0" Grid.Row="0">
            <Label Content="Filter:" Height="28" HorizontalAlignment="Left" Margin="6,9,0,0" Name="labelFilter" VerticalAlignment="Top" />
            <TextBox Height="23" HorizontalAlignment="Center" Margin="57,9,6,0" Name="textBoxFilter" VerticalAlignment="Top" Width="309" TextChanged="TextBox_TextChanged"/>
            <CheckBox Content="Select all" Height="16" HorizontalAlignment="Left" Margin="6,40,0,0" Name="checkBoxSelectAll"
                VerticalAlignment="Top" Checked="CheckBoxSelectAll_Checked" Unchecked="CheckBoxSelectAll_Unchecked"/>
            <Label Content="Label" Height="28" HorizontalAlignment="Stretch" Margin="76,35,6,0" Name="labelSelected"
                VerticalAlignment="Top" />
        </Grid>
        <ListBox Grid.Row="1" Name="listBox" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="6,0">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="20" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <CheckBox Grid.Column="0" IsChecked="{Binding Selected, Mode=TwoWay}" Checked="CheckBoxListBox_Checked"
                        Unchecked="CheckBoxListBox_Unchecked" />
                        <TextBlock Grid.Column="1" Text="{Binding FriendlyName}" />
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <Button Content="OK" Grid.Row="2" Height="23" HorizontalAlignment="Right" Margin="0,0,93,12" Name="buttonOk" VerticalAlignment="Bottom" Width="75" IsDefault="True" Click="ButtonOk_Click" />
        <Button Content="Cancel" Grid.Row="2" Height="23" HorizontalAlignment="Right" Margin="0,0,12,12" Name="buttonCancel" VerticalAlignment="Bottom" Width="75" IsCancel="True" Click="ButtonCancel_Click" />
    </Grid>
</Window>
